home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / gnu / a2_0b_Emacs_sr.lha / Emacs-19.25 / lib-src / Makefile.in < prev    next >
Makefile  |  1993-11-26  |  10KB  |  284 lines

  1. # DIST: This is the distribution Makefile for Emacs.  configure can
  2. # DIST: make most of the changes to this file you might want, so try
  3. # DIST: that first.
  4.  
  5. # add -DUSG for SysV movemail and timer
  6. # For Xenix, add the following for movemail:
  7. #  LOADLIBES= -lx
  8. # For Mips, the following is needed for who knows what.
  9. #  LOADLIBES = -lmld /usr/bsd43/usr/lib/libc.a
  10.  
  11. # Avoid trouble on systems where the `SHELL' variable might be
  12. # inherited from the environment.
  13. SHELL = /bin/sh
  14.  
  15. # ==================== Things `configure' will edit ====================
  16.  
  17. CC=@CC@
  18. CFLAGS=@CFLAGS@
  19. ALLOCA=@ALLOCA@
  20. C_SWITCH_SYSTEM=@c_switch_system@
  21. LOADLIBES=@libsrc_libs@
  22. YACC=@YACC@
  23. version=@version@
  24. configname=@configuration@
  25.  
  26. # ==================== Where To Install Things ====================
  27.  
  28. # The default location for installation.  Everything is placed in
  29. # subdirectories of this directory.  The default values for many of
  30. # the variables below are expressed in terms of this one, so you may
  31. # not need to change them.  This is set with the --prefix option to
  32. # `../configure'.
  33. prefix=@prefix@
  34.  
  35. # Like `prefix', but used for architecture-specific files.  This is
  36. # set with the --exec-prefix option to `../configure'.
  37. exec_prefix=@exec_prefix@
  38.  
  39. # Where to install Emacs and other binaries that people will want to
  40. # run directly (like etags).  This is set with the --bindir option
  41. # to `../configure'.
  42. bindir=@bindir@
  43.  
  44. # Where to install and expect executable files to be run by Emacs
  45. # rather than directly by users, and other architecture-dependent
  46. # data.  ${archlibdir} is usually below this.  This is set with the
  47. # --libdir option to `../configure'.
  48. libdir=@libdir@
  49.  
  50. # Where to find the source code.  This is set by the configure
  51. # script's `--srcdir' option.  However, the value of ${srcdir} in
  52. # this makefile is not identical to what was specified with --srcdir,
  53. # since the variable here has `/lib-src' added at the end.
  54. srcdir=@srcdir@
  55. VPATH=@srcdir@
  56.  
  57. # ==================== Emacs-specific directories ====================
  58.  
  59. # These variables hold the values Emacs will actually use.  They are
  60. # based on the values of the standard Make variables above.
  61.  
  62. # Where to put executables to be run by Emacs rather than the user.
  63. # This path usually includes the Emacs version and configuration name,
  64. # so that multiple configurations for multiple versions of Emacs may
  65. # be installed at once.  This can be set with the --archlibdir option
  66. # to `../configure'.
  67. archlibdir=@archlibdir@
  68.  
  69. # ==================== Utility Programs for the Build ====================
  70.  
  71. # ../configure figures out the correct values for these.
  72. INSTALL = @INSTALL@
  73. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  74. INSTALL_DATA = @INSTALL_DATA@
  75.  
  76. # ============================= Targets ==============================
  77.  
  78. # Things that a user might actually run, which should be installed in bindir.
  79. INSTALLABLES = etags ctags emacsclient b2m
  80. INSTALLABLE_SCRIPTS = rcs-checkin
  81.  
  82. # Things that Emacs runs internally, or during the build process,
  83. # which should not be installed in bindir.
  84. UTILITIES= test-distrib make-path wakeup make-docfile digest-doc sorted-doc \
  85.     movemail cvtmail fakemail yow env emacsserver hexl timer
  86.  
  87. # Like UTILITIES, but they're not system-dependent, and should not be
  88. # deleted by the distclean target.
  89. SCRIPTS= rcs2log vcdiff
  90.  
  91. EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}
  92.  
  93. SOURCES = COPYING ChangeLog Makefile.in README aixcc.lex emacs.csh \
  94.     makedoc.com *.[chy] rcs2log vcdiff
  95.  
  96. ### We need to #define emacs to get the right versions of some files.
  97. ### Some other files - those shared with other GNU utilities - need
  98. ### HAVE_CONFIG_H #defined before they know they can take advantage of
  99. ### the information in ../src/config.h.
  100. ALL_CFLAGS = ${C_SWITCH_SYSTEM} -Demacs -DHAVE_CONFIG_H \
  101.    -I. -I../src -I${srcdir} -I${srcdir}/../src ${CFLAGS}
  102. CPP_CFLAGS = ${C_SWITCH_SYSTEM} -Demacs -DHAVE_CONFIG_H \
  103.    -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS}
  104. # This is the default compilation command.
  105. # But we should never rely on it, because some make version
  106. # failed to find it for getopt.o.  Using an explicit command made it work.
  107. .c.o:
  108.     ${CC} -c ${CPP_CFLAGS} $<
  109.  
  110. all: ${UTILITIES} ${INSTALLABLES}
  111.  
  112. ### Install the internal utilities.  Until they are installed, we can
  113. ### just run them directly from lib-src.
  114. ${archlibdir}: all
  115.     @echo
  116.     @echo "Installing utilities run internally by Emacs."
  117.     ./make-path ${archlibdir}
  118.     if [ `(cd ${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \
  119.       for file in ${UTILITIES}; do \
  120.         $(INSTALL_PROGRAM) $$file ${archlibdir}/$$file ; \
  121.         chmod 755 ${archlibdir}/$$file ; \
  122.       done ; \
  123.       for file in ${SCRIPTS}; do \
  124.         $(INSTALL_PROGRAM) ${srcdir}/$$file ${archlibdir}/$$file ; \
  125.         chmod 755 ${archlibdir}/$$file ; \
  126.       done ; \
  127.     fi
  128.  
  129. # We don't need to install `wakeup' explicitly, because it will be copied when
  130. # this whole directory is copied.
  131. # We use .n, not .new as before, to avoid exceeding the 14-character limit.
  132. install: ${archlibdir}
  133.     @echo
  134.     @echo "Installing utilities for users to run."
  135.     for file in ${INSTALLABLES} ; do \
  136.       cp $${file} ${bindir}/$${file}.n ; \
  137.       chmod 755 ${bindir}/$${file}.n ; \
  138.     done
  139.     for file in ${INSTALLABLE_SCRIPTS} ; do \
  140.       cp ${srcdir}/$${file} ${bindir}/$${file}.n ; \
  141.       chmod 755 ${bindir}/$${file}.n ; \
  142.     done
  143.     -for file in ${INSTALLABLES}  ${INSTALLABLE_SCRIPTS} ; do \
  144.       rm -f ${bindir}/$${file} ; \
  145.       mv ${bindir}/$${file}.n ${bindir}/$${file} ; \
  146.     done
  147.  
  148. uninstall:
  149.     (cd ${bindir}; \
  150.      rm -f ${INSTALLABLES} ${INSTALLABLE_SCRIPTS})
  151.     (cd ${archlibdir}; \
  152.      rm -f ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS})
  153.  
  154. mostlyclean:
  155.     -rm -f core *.o
  156.  
  157. clean: mostlyclean
  158.     -rm -f ${INSTALLABLES} ${UTILITIES}
  159.  
  160. distclean: clean
  161.     -rm -f ../etc/DOC* *.tab.c *.tab.h aixcc.c TAGS
  162.  
  163. realclean: distclean
  164.     true
  165.  
  166. extraclean: realclean
  167.     -rm -f *~ \#*
  168.  
  169. unlock:
  170.     chmod u+w $(SOURCES)
  171.  
  172. relock:
  173.     chmod u-w $(SOURCES)
  174.  
  175. # Test the contents of the directory.
  176. check:
  177.     @echo "We don't have any tests for GNU Emacs yet."
  178.  
  179. TAGS: etags
  180.     etags *.[ch]
  181.  
  182. # This verifies that the non-ASCII characters in the file `testfile'
  183. # have not been clobbered by whatever means were used to copy and
  184. # distribute Emacs.  If they were clobbered, all the .elc files were
  185. # clobbered too.
  186. test-distrib: ${srcdir}/test-distrib.c
  187.     $(CC) -o test-distrib ${srcdir}/test-distrib.c
  188.     ./test-distrib ${srcdir}/testfile
  189.  
  190. GETOPTOBJS = getopt.o getopt1.o $(ALLOCA)
  191. GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h
  192. getopt.o: ${srcdir}/getopt.c ${srcdir}/getopt.h
  193.     ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt.c
  194. getopt1.o: ${srcdir}/getopt1.c ${srcdir}/getopt.h
  195.     ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt1.c
  196.  
  197. etags: ${srcdir}/etags.c $(GETOPTDEPS) ../src/config.h
  198.     $(CC) ${CPP_CFLAGS} -DETAGS ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o etags
  199.  
  200. # We depend on etags to assure that parallel makes don't write two
  201. # etags.o files on top of each other.
  202. ctags: ${srcdir}/etags.c $(GETOPTDEPS) etags
  203.     $(CC) ${CPP_CFLAGS} -DCTAGS ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o ctags
  204.  
  205. wakeup: ${srcdir}/wakeup.c
  206.     $(CC) ${CPP_CFLAGS} ${srcdir}/wakeup.c $(LOADLIBES) -o wakeup
  207.  
  208. make-docfile: ${srcdir}/make-docfile.c
  209.     $(CC) ${CPP_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile
  210.  
  211. digest-doc: ${srcdir}/digest-doc.c
  212.     $(CC) ${CPP_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc 
  213.  
  214. sorted-doc: ${srcdir}/sorted-doc.c ${ALLOCA}
  215.     $(CC) ${CPP_CFLAGS} ${srcdir}/sorted-doc.c ${ALLOCA} $(LOADLIBES) -o sorted-doc
  216.  
  217. b2m: ${srcdir}/b2m.c ../src/config.h
  218.     $(CC) ${CPP_CFLAGS} ${srcdir}/b2m.c $(LOADLIBES) -o b2m 
  219.  
  220. movemail: ${srcdir}/movemail.c ../src/config.h
  221.     $(CC) ${CPP_CFLAGS} ${srcdir}/movemail.c $(LOADLIBES) -o movemail
  222.  
  223. cvtmail: ${srcdir}/cvtmail.c
  224.     $(CC) ${CPP_CFLAGS} ${srcdir}/cvtmail.c $(LOADLIBES) -o cvtmail
  225.  
  226. fakemail: ${srcdir}/fakemail.c ../src/config.h
  227.     $(CC) ${CPP_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail
  228.  
  229. yow: ${srcdir}/yow.c ../src/paths.h
  230.     $(CC) ${CPP_CFLAGS} ${srcdir}/yow.c $(LOADLIBES) -o yow
  231.  
  232. env: ${srcdir}/env.c ../src/config.h
  233.     $(CC) -DEMACS ${CPP_CFLAGS} ${srcdir}/env.c $(LOADLIBES) -o env
  234.  
  235. emacsserver: ${srcdir}/emacsserver.c ../src/config.h
  236.     $(CC) ${CPP_CFLAGS} ${srcdir}/emacsserver.c $(LOADLIBES) -o emacsserver
  237.  
  238. emacsclient: ${srcdir}/emacsclient.c ../src/config.h
  239.     $(CC) ${CPP_CFLAGS} ${srcdir}/emacsclient.c $(LOADLIBES) -o emacsclient
  240.  
  241. hexl: ${srcdir}/hexl.c
  242.     $(CC) ${CPP_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl
  243.  
  244. TIMEROBJS=getdate.o timer.o $(ALLOCA)
  245. getdate.o: ${srcdir}/getdate.y ../src/config.h
  246.     ${YACC} ${YFLAGS} ${srcdir}/getdate.y
  247.     $(CC) $(CPP_CFLAGS) -c y.tab.c
  248.     mv y.tab.o getdate.o
  249. timer.o: ${srcdir}/timer.c ../src/config.h
  250.     $(CC) -c $(CPP_CFLAGS) ${srcdir}/timer.c
  251. timer: ${TIMEROBJS}
  252.     $(CC) $(ALL_CFLAGS) ${TIMEROBJS} $(LOADLIBES) -o timer
  253.  
  254. make-path: ${srcdir}/make-path.c ../src/config.h
  255.     $(CC) $(CPP_CFLAGS) ${srcdir}/make-path.c -o make-path
  256.  
  257. # These are NOT included in INSTALLABLES or UTILITIES.
  258. # See ../src/ymakefile.
  259. emacstool: ${srcdir}/emacstool.c
  260.     $(CC) ${srcdir}/emacstool.c -o emacstool ${CPP_CFLAGS} \
  261.       -lsuntool -lsunwindow -lpixrect $(LOADLIBES)
  262.  
  263. # For SUN Japanese Language Environment
  264. nemacstool: ${srcdir}/emacstool.c
  265.     $(CC) -o nemacstool -DJLE ${CPP_CFLAGS} ${srcdir}/emacstool.c \
  266.       -lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES)
  267.  
  268. xvetool: ${srcdir}/emacstool.c
  269.     $(CC) -o xvetool -DXVIEW ${CPP_CFLAGS} ${srcdir}/emacstool.c \
  270.       -lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
  271.       $(LOADLIBES)
  272.  
  273. xveterm: ${srcdir}/emacstool.c
  274.     $(CC) -o xveterm -DXVIEW -DTTERM ${CPP_CFLAGS} ${srcdir}/emacstool.c \
  275.       -lxview -lolgx -lX  -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
  276.       $(LOADLIBES)
  277.  
  278. aixcc: ${srcdir}/aixcc.c
  279.     $(CC) $(CPP_CFLAGS) -o aixcc ${srcdir}/aixcc.c
  280.  
  281. aixcc.c: ${srcdir}/aixcc.lex
  282.     lex ${srcdir}/aixcc.lex
  283.     mv lex.yy.c aixcc.c
  284.